package com.gelingqin.es.springbootdemo.process;

import com.gelingqin.es.springbootdemo.entity.Condition;
import com.gelingqin.es.springbootdemo.entity.Query;

import java.util.List;



public class BetweenProcess  implements ConditionProcess{

	@Override
	public void process(Query query, Condition condition) {
		
		List<String> values=condition.getValues();
		if (values!=null&&values.size()==2) {
			query.rangeGte(condition.getKey(), values.get(0));
			query.rangeLte(condition.getKey(), values.get(1));
		}
	}

}
